package com.vii.brillien.core.component.chatty;

import com.vii.brillien.core.component.SuperPresence;
import com.vii.brillien.kernel.BrillienException;
import com.vii.brillien.kernel.annotations.PresenceService;
import com.vii.brillien.kernel.annotations.lifecycle.Resident;
import com.vii.streamline.services.error.StreamLineException;

@PresenceService
@Resident
public class Bob extends SuperPresence {
    
    public void hello() throws BrillienException {
        sendAGet("karl", "saySomething", "hearyou", null);
    }
    
    public String hearyou(String response){
        return response;
    }

    public void deceivingPlan() throws BrillienException {
        throw new BrillienException( StreamLineException.ERROR_INTERNAL_ERROR, "No such behavior please!" );
    }

    public void delegateplease() throws BrillienException {
        sendAGet("karl", "whatinyourmind", "really", null);
    }

    public void really(String response) throws BrillienException {
        sendAGet("karl", "detailsplease", "understood", null);
    }

    public String understood(String response) throws BrillienException {
        return response;
    }

}
